<?php

class System_Util {
	function product_price($type, $value){
	
		if(strtoupper($type) == "VND"){
	
			$price = $value+0;
			$currency = new Zend_Currency(
					array(
					   "value"			=>$price,                           
					   "currency"		=>"VND",
					   "symbol"			=>"đ",
					   "display"		=>2,
					   "precision"		=>0,
					   "number_format" 	=>"#.##0.00",
					   "locale"			=>"vi_VN",
					   "position"		=>Zend_Currency::RIGHT)
					);
			return $currency->toCurrency();
	
		}elseif(strtoupper($type) == 'USD'){
			$currency = new Zend_Currency('en_US');
			$helper = new Zend_View_Helper_Currency($currency);			
			return $helper->currency($value);
		}		
	
	}
	
}

?>